<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Anchor</title>
	<script type="text/javascript" src="../../working/core.js"></script>
	<script type="text/javascript">
	
		/** *********************************************************************************
		 *  IE 8 onhashchange http://msdn.microsoft.com/en-us/library/cc891506(VS.85).aspx
		 *
		 *
		 **/	
		
	
	
	
	
	
		compono.ready(function(){
			
			/** *****************************************************************************
				Option 2
				Core Event builted in
				
			**/
			search = new compono.ui.Window();
			search.modal = true;
			
			search.event("#ajax-search",function(event){
				/*
				Event object when triggered by action events
					event{
						type:"action",
						text:"ajax-search",
						preventDefault:function(){},
						stopPropagation:function(){}
					}
				*/
				this.show();
			})
			
			search.event("success",function(event){
				
			})
			
			search.event("defaultAction",function(event){
				
			})

			search.run( $('searchWindowContent') )
			
			
			
			/** *****************************************************************************
				Set anchors by html
				<a href="#ajax-search">Ajax Search</a>
			**/
			
			
			/** *****************************************************************************
				Set anchors by script
			**/
			compono.runActionEventTo("ajax-search")
			
			//Running the event
			search.runEvent("#ajax-search")
		})
		
		
	</script>
</head>
<body>
	
	<div id="searchWindowContent">
		<h1>Teste</h1>	
	</div>
	
</body>
</html>